/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.commons;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.ruipengkj.service.MonthMarkeViewService;
import com.ruipengkj.service.StatmentDayBuySummaryViewService;
import com.ruipengkj.service.StatmentDaySaleSummaryViewService;
import com.ruipengkj.service.StatmentMonthBuySummaryViewService;
import com.ruipengkj.service.StatmentMonthSaleSummaryViewService;
import com.ruipengkj.service.StatmentOrderDetailViewService;
import com.ruipengkj.service.StatmentOrderSummaryViewService;
import com.ruipengkj.service.StatmentYearBuySummaryViewService;
import com.ruipengkj.service.StatmentYearSaleSummaryViewService;
import com.ruipengkj.service.TBillDetailDesService;
import com.ruipengkj.service.TBillDetailService;
import com.ruipengkj.service.TBookService;
import com.ruipengkj.service.TCabinetService;
import com.ruipengkj.service.TCashCardService;
import com.ruipengkj.service.TCommentService;
import com.ruipengkj.service.TCommodityPictureService;
import com.ruipengkj.service.TCommodityService;
import com.ruipengkj.service.TCommoditySuitDetailService;
import com.ruipengkj.service.TConfigService;
import com.ruipengkj.service.TDeptService;
import com.ruipengkj.service.TDiscountService;
import com.ruipengkj.service.TEmployeeService;
import com.ruipengkj.service.TExePosCatalogService;
import com.ruipengkj.service.TExePosService;
import com.ruipengkj.service.TExeStageService;
import com.ruipengkj.service.TExeStageTmplService;
import com.ruipengkj.service.TFeeDetailService;
import com.ruipengkj.service.TFeeService;
import com.ruipengkj.service.TFeeTypeService;
import com.ruipengkj.service.TGiftService;
import com.ruipengkj.service.TItempicService;
import com.ruipengkj.service.TLPicService;
import com.ruipengkj.service.TMoneyInOutService;
import com.ruipengkj.service.TMyCashCardService;
import com.ruipengkj.service.TMyMessageService;
import com.ruipengkj.service.TMySiteGiftService;
import com.ruipengkj.service.TOpLogService;
import com.ruipengkj.service.TOrderRefundService;
import com.ruipengkj.service.TOrderReturnService;
import com.ruipengkj.service.TOrderService;
import com.ruipengkj.service.TOrderSummaryService;
import com.ruipengkj.service.TOutBillService;
import com.ruipengkj.service.TPointDetailService;
import com.ruipengkj.service.TProductCatalogService;
import com.ruipengkj.service.TPurchaseReturnService;
import com.ruipengkj.service.TPurchaseService;
import com.ruipengkj.service.TResumeService;
import com.ruipengkj.service.TRightService;
import com.ruipengkj.service.TRoleRightIMService;
import com.ruipengkj.service.TRoleRightService;
import com.ruipengkj.service.TRoleService;
import com.ruipengkj.service.TSaleactSummaryService;
import com.ruipengkj.service.TScheduledService;
import com.ruipengkj.service.TSendInfoService;
import com.ruipengkj.service.TSerShiftTypeService;
import com.ruipengkj.service.TShopChargeService;
import com.ruipengkj.service.TShopJobService;
import com.ruipengkj.service.TShopMemberLevelService;
import com.ruipengkj.service.TShopMsgService;
import com.ruipengkj.service.TShopRechargeService;
import com.ruipengkj.service.TShopService;
import com.ruipengkj.service.TShopVisitService;
import com.ruipengkj.service.TSiteGiftService;
import com.ruipengkj.service.TSiteProductCatalogService;
import com.ruipengkj.service.TStockAlarmService;
import com.ruipengkj.service.TStockInOutDetailService;
import com.ruipengkj.service.TStockInOutService;
import com.ruipengkj.service.TStockService;
import com.ruipengkj.service.TStoreService;
import com.ruipengkj.service.TStoreTransferService;
import com.ruipengkj.service.TSupplierService;
import com.ruipengkj.service.TTexperienceService;
import com.ruipengkj.service.TUserRevisitService;
import com.ruipengkj.service.TUserService;
import com.ruipengkj.service.TWorkShiftService;
import com.ruipengkj.service.ViewBusinessPerformanceService;
import com.ruipengkj.service.ViewCommodityOrderReturnSummaryService;
import com.ruipengkj.service.ViewCommodityOrderSummaryService;
import com.ruipengkj.service.ViewCommodityOutInSummaryService;
import com.ruipengkj.service.ViewInStockSummaryService;
import com.ruipengkj.service.ViewMenberSalesSummaryService;
import com.ruipengkj.service.ViewOutStockSummaryService;
import com.ruipengkj.service.ViewProfitCommoditySummaryService;
import com.ruipengkj.service.ViewPurchaseCommodityReturnSummaryService;
import com.ruipengkj.service.ViewPurchaseCommoditySummaryService;
import com.ruipengkj.service.ViewPurchaseOrderSummaryService;
import com.ruipengkj.service.ViewStoreStockSummaryService;
import com.ruipengkj.service.ViewSupplierDetailSummaryService;
import com.ruipengkj.service.ViewSurplusOrderService;
/**
 * 说明：
 * spring加载类
 * @Author：Juffer
 * @Date：2012-03-14
 */
public class BuildSpringApplication {
	private ApplicationContext context = null;
	private static BuildSpringApplication springApplication;
	
	public static void main(String[] args) {
		new BuildSpringApplication();
	}
	
	private BuildSpringApplication(){
		context=new ClassPathXmlApplicationContext("spring/applicationContext-*.xml");
	}
	
	public static BuildSpringApplication getInstance(){
		if(null==springApplication)
			springApplication=new BuildSpringApplication();
		return springApplication;
	}
	public static BuildSpringApplication getInstance(boolean isNew){
		return springApplication=new BuildSpringApplication();
	}
//	public ApplicationContext getApplication(){
//		return this.context;
//	}
	private Object getBean(String key){
		return context.getBean(key);
	}
	public TBillDetailService getTBillDetailServiceImpl(){
		return (TBillDetailService)this.getBean("TBillDetailServiceImpl");
	}
	public TCashCardService getTCashCardServiceImpl(){
		return (TCashCardService)this.getBean("TCashCardServiceImpl");
	}
	public TCommodityService getTCommodityServiceImpl(){
		return (TCommodityService)this.getBean("TCommodityServiceImpl");
	}
	public TCommodityPictureService getTCommodityPictureServiceImpl(){
		return (TCommodityPictureService)this.getBean("TCommodityPictureServiceImpl");
	}
	public TCommoditySuitDetailService getTCommoditySuitDetailServiceImpl(){
		return (TCommoditySuitDetailService)this.getBean("TCommoditySuitDetailServiceImpl");
	}
	public TConfigService getTConfigServiceImpl(){
		return (TConfigService)this.getBean("TConfigServiceImpl");
	}
	public TDeptService getTDeptServiceImpl(){
		return (TDeptService)this.getBean("TDeptServiceImpl");
	}
	public TDiscountService getTDiscountServiceImpl(){
		return (TDiscountService)this.getBean("TDiscountServiceImpl");
	}
	public TEmployeeService getTEmployeeServiceImpl(){
		return (TEmployeeService)this.getBean("TEmployeeServiceImpl");
	}
	public TFeeDetailService getTFeeDetailServiceImpl(){
		return (TFeeDetailService)this.getBean("TDeptServiceImpl");
	}
	public TFeeService getTFeeServiceImpl(){
		return (TFeeService)this.getBean("TFeeServiceImpl");
	}
	public TShopMsgService getTShopMsgServiceImpl(){
		return (TShopMsgService)this.getBean("TShopMsgServiceImpl");
	}
	public TMyMessageService getTMyMessageServiceImpl(){
		return (TMyMessageService)this.getBean("TMyMessageServiceImpl");
	}
	public TCabinetService getTCabinetServiceImpl(){
		return (TCabinetService)this.getBean("TCabinetServiceImpl");
	}
	public TCommentService getTCommentServiceImpl(){
		return (TCommentService)this.getBean("TCommentServiceImpl");
	}
	public TFeeTypeService getTFeeTypeServiceImpl(){
		return (TFeeTypeService)this.getBean("TFeeTypeServiceImpl");
	}
	public TShopVisitService getTShopVisitServiceImpl(){
		return (TShopVisitService)this.getBean("TShopVisitServiceImpl");
	}
	public TSiteProductCatalogService getTSiteProductCatalogServiceImpl(){
		return (TSiteProductCatalogService)this.getBean("TSiteProductCatalogServiceImpl");
	}
	public TShopRechargeService getTShopRechargeServiceImpl(){
		return (TShopRechargeService)this.getBean("TShopRechargeServiceImpl");
	}
	public TGiftService getTGiftServiceImpl(){
		return (TGiftService)this.getBean("TGiftServiceImpl");
	}
	public TResumeService getTResumeServiceImpl(){
		return (TResumeService)this.getBean("TResumeServiceImpl");
	}
	
	public TSerShiftTypeService getTSerShiftTypeServiceImpl(){
		return (TSerShiftTypeService)this.getBean("TSerShiftTypeServiceImpl");
	}
	public TSaleactSummaryService getTSaleactSummaryServiceImpl(){
		return (TSaleactSummaryService)this.getBean("TSaleactSummaryServiceImpl");
	}
	public TExeStageTmplService getTExeStageTmplServiceImpl(){
		return (TExeStageTmplService)this.getBean("TExeStageTmplServiceImpl");
	}
	public TExeStageService getTExeStageServiceImpl(){
		return (TExeStageService)this.getBean("TExeStageServiceImpl");
	}
	//预定表
	public TBookService getTBookServiceImpl(){
		return (TBookService)this.getBean("TBookServiceImpl");
	}
	//实施场所
	public TExePosService getTExePosServiceImpl(){
		return (TExePosService)this.getBean("TExePosServiceImpl");
	}
	//实施场所类别
	public TExePosCatalogService getTExePosCatalogServiceImpl(){
		return (TExePosCatalogService)this.getBean("TExePosCatalogServiceImpl");
	}
	public TMoneyInOutService getTMoneyInOutServiceImpl(){
		return (TMoneyInOutService)this.getBean("TMoneyInOutServiceImpl");
	}
	public TMyCashCardService getTMyCashCardServiceImpl(){
		return (TMyCashCardService)this.getBean("TMyCashCardServiceImpl");
	}
	public TSiteGiftService getTSiteGiftServiceImpl(){
		return (TSiteGiftService)this.getBean("TSiteGiftServiceImpl");
	}
	public TOpLogService getTOpLogServiceImpl(){
		return (TOpLogService)this.getBean("TOpLogServiceImpl");
	}
	public TOrderReturnService getTOrderReturnServiceImpl(){
		return (TOrderReturnService)this.getBean("TOrderReturnServiceImpl");
	}
	public TOrderService getTOrderServiceImpl(){
		return (TOrderService)this.getBean("TOrderServiceImpl");
	}
	public TScheduledService getTScheduledServiceImpl(){
		return (TScheduledService)this.getBean("TScheduledServiceImpl");
	}
	public TProductCatalogService getTProductCatalogServiceImpl(){
		return (TProductCatalogService)this.getBean("TProductCatalogServiceImpl");
	}
	public TPurchaseReturnService getTPurchaseReturnServiceImpl(){
		return (TPurchaseReturnService)this.getBean("TPurchaseReturnServiceImpl");
	}
	public TPurchaseService getTPurchaseServiceImpl(){
		return (TPurchaseService)this.getBean("TPurchaseServiceImpl");
	}
	public TRightService getTRightServiceImpl(){
		return (TRightService)this.getBean("TRightServiceImpl");
	}
	public TRoleRightService getTRoleRightServiceImpl(){
		return (TRoleRightService)this.getBean("TRoleRightServiceImpl");
	}
	public TRoleRightIMService getTRoleRightIMServiceImpl(){
		return (TRoleRightIMService)this.getBean("TRoleRightIMServiceImpl");
	}
	public TRoleService getTRoleServiceImpl(){
		return (TRoleService)this.getBean("TRoleServiceImpl");
	}
	public TSendInfoService getTSendInfoServiceImpl(){
		return (TSendInfoService)this.getBean("TSendInfoServiceImpl");
	}
	public TShopChargeService getTShopChargeServiceImpl(){
		return (TShopChargeService)this.getBean("TShopChargeServiceImpl");
	}
	public TShopMemberLevelService getTShopMemberLevelServiceImpl(){
		return (TShopMemberLevelService)this.getBean("TShopMemberLevelServiceImpl");
	}
	public TShopService getTShopServiceImpl(){
		return (TShopService)this.getBean("TShopServiceImpl");
	}
	public TStockAlarmService getTStockAlarmServiceImpl(){
		return (TStockAlarmService)this.getBean("TStockAlarmServiceImpl");
	}
	public TStockInOutDetailService getTStockInOutDetailServiceImpl(){
		return (TStockInOutDetailService)this.getBean("TStockInOutDetailServiceImpl");
	}
	public TStockInOutService getTStockInOutServiceImpl(){
		return (TStockInOutService)this.getBean("TStockInOutServiceImpl");
	}
	public TStockService getTStockServiceImpl(){
		return (TStockService)this.getBean("TStockServiceImpl");
	}
	public TStoreService getTStoreServiceImpl(){
		return (TStoreService)this.getBean("TStoreServiceImpl");
	}
	public TStoreTransferService getTStoreTransferServiceImpl(){
		return (TStoreTransferService)this.getBean("TStoreTransferServiceImpl");
	}
	public TSupplierService getTSupplierServiceImpl(){
		return (TSupplierService)this.getBean("TSupplierServiceImpl");
	}
	public TUserRevisitService getTUserRevisitServiceImpl(){
		return (TUserRevisitService)this.getBean("TUserRevisitServiceImpl");
	}
	public TUserService getTUserServiceImpl(){
		return (TUserService)this.getBean("TUserServiceImpl");
	}
	public TOutBillService getTOutBillServiceImpl(){
		return (TOutBillService)this.getBean("TOutBillServiceImpl");
	}
	public TBillDetailDesService getTBillDetailDesServiceImpl(){
		return (TBillDetailDesService)this.getBean("TBillDetailDesServiceImpl");
	}
	public TMySiteGiftService getTMySiteGiftServiceImpl(){
		return (TMySiteGiftService)this.getBean("TMySiteGiftServiceImpl");
	}
	//送积分
	public TPointDetailService getTPointDetailImpl(){
		return (TPointDetailService)this.getBean("TPointDetailServiceImpl");
	}
	public TWorkShiftService getTWorkShiftServiceImpl(){
		return (TWorkShiftService) this.getBean("TWorkShiftServiceImpl");
	}
	public TShopJobService getTShopJobServiceImpl(){
		return (TShopJobService)this.getBean("TShopJobServiceImpl");
	}
	public TTexperienceService getTTexperienceServiceImpl(){
		return (TTexperienceService)this.getBean("TTexperienceServiceImpl");
	}
	public TLPicService getTLPicServiceImpl(){
		return (TLPicService)this.getBean("TLPicServiceImpl");
	}
	public TItempicService getTItempicServiceImpl(){
		return (TItempicService)this.getBean("TItempicServiceImpl");
	}
	public TOrderRefundService getTOrderRefundServiceImpl(){
		return (TOrderRefundService)this.getBean("TOrderRefundServiceImpl");
	}
	public TOrderSummaryService getTOrderSummaryServiceImpl(){
		return (TOrderSummaryService)this.getBean("TOrderSummaryServiceImpl");
	}

	
	//报表
	public ViewPurchaseOrderSummaryService getViewPurchaseOrderSummaryServiceImpl(){
		return (ViewPurchaseOrderSummaryService)this.getBean("viewPurchaseOrderSummaryServiceImpl");
	}
	//采购商品汇总表
	public ViewPurchaseCommoditySummaryService getViewCommodityPurchaseSummaryServiceImpl(){
		return (ViewPurchaseCommoditySummaryService)this.getBean("viewPurchaseCommoditySummaryServiceImpl");
	}
	//采购商品退货汇总表
	public ViewPurchaseCommodityReturnSummaryService getViewCommodityPurchaseReturnSummaryServiceImpl(){
		return (ViewPurchaseCommodityReturnSummaryService)this.getBean("viewPurchaseCommodityReturnSummaryServiceImpl");
	}
	//月度采购表
	public StatmentMonthBuySummaryViewService getStatmentMonthBuySummaryViewServiceImpl(){
		
		return (StatmentMonthBuySummaryViewService)this.getBean("statementMonthBuySummaryViewServiceImpl");
	}
	//年度采购表
	public StatmentYearBuySummaryViewService getStatmentYearBuySummaryViewServiceImpl(){
			
		return (StatmentYearBuySummaryViewService)this.getBean("statementYearBuySummaryViewServiceImpl");
	}
	//日度采购表
	public StatmentDayBuySummaryViewService getStatmentDayBuySummaryViewServiceImpl(){
			
		return (StatmentDayBuySummaryViewService)this.getBean("statementDayBuySummaryViewServiceImpl");
	}
	
	//供货单明细汇总表
	public ViewSupplierDetailSummaryService getViewSupplierDetailSummaryServiceImpl(){
		return (ViewSupplierDetailSummaryService)this.getBean("viewSupplierDetailSummaryServiceImpl");
	}
	//盘点入库单汇总表
	public ViewInStockSummaryService getViewInStockSummaryServiceImpl(){
		return (ViewInStockSummaryService)this.getBean("viewInStockSummaryServiceImpl");
	}
	//盘点出库单汇总表
	public ViewOutStockSummaryService getViewOutStockSummaryServiceImpl(){
		return (ViewOutStockSummaryService)this.getBean("viewOutStockSummaryServiceImpl");
	}
	//商品出入库汇总表
	public ViewCommodityOutInSummaryService getViewCommodityOutInSummaryServiceImpl(){
		return (ViewCommodityOutInSummaryService)this.getBean("viewCommodityOutInSummaryServiceImpl");
	}
	
	
	
	//商品销售汇总表
	public ViewCommodityOrderSummaryService getViewCommodityOrderSummaryServiceImpl(){
		return (ViewCommodityOrderSummaryService)this.getBean("viewCommodityOrderSummaryServiceImpl");
	}
	//商品销售退货汇总表
	public ViewCommodityOrderReturnSummaryService getViewCommodityOrderReturnSummaryServiceImpl(){
		return (ViewCommodityOrderReturnSummaryService)this.getBean("viewCommodityOrderReturnSummaryServiceImpl");
	}
	
	//销售订单汇总表
	public StatmentOrderSummaryViewService getStatmentOrderSummaryViewServiceImpl(){
		
		return (StatmentOrderSummaryViewService)this.getBean("statementOrderSummaryViewServiceImpl");
	}
	//会员销售汇总表
	public ViewMenberSalesSummaryService getViewMenberSalesSummaryServiceImpl(){
		
		return (ViewMenberSalesSummaryService)this.getBean("viewMenberSalesSummaryServiceImpl");
	}
	
	//月度销售表
	public StatmentMonthSaleSummaryViewService getStatmentMonthSaleSummaryViewServiceImpl(){
		
		return (StatmentMonthSaleSummaryViewService)this.getBean("statementMonthSaleSummaryViewServiceImpl");
	}
	//年度销售表
	public StatmentYearSaleSummaryViewService getStatmentYearSaleSummaryViewServiceImpl(){
			
		return (StatmentYearSaleSummaryViewService)this.getBean("statementYearSaleSummaryViewServiceImpl");
	}
	//日度销售表
	public StatmentDaySaleSummaryViewService getStatmentDaySaleSummaryViewServiceImpl(){
			
		return (StatmentDaySaleSummaryViewService)this.getBean("statementDaySaleSummaryViewServiceImpl");
	}
	
	//销售订单明细表
	public StatmentOrderDetailViewService getStatmentOrderDetailViewServiceImpl(){
		return (StatmentOrderDetailViewService)this.getBean("statementOrderDetailViewServiceImpl");
	}
	
	
	
	//商品毛利润表
	public ViewProfitCommoditySummaryService getViewProfitCommoditySummaryServiceImpl(){
		return (ViewProfitCommoditySummaryService)this.getBean("viewProfitCommoditySummaryServiceImpl");
	}
	
	//经营业绩表
	public ViewBusinessPerformanceService getViewBusinessPerformanceServiceImpl(){
		return (ViewBusinessPerformanceService)this.getBean("viewBusinessPerformanceServiceImpl");
	}
	
	//仓库存量报表
	public ViewStoreStockSummaryService getViewStoreStockSummaryServiceImpl(){
		return (ViewStoreStockSummaryService)this.getBean("viewStoreStockSummaryServiceImpl");
	}
	
	//盈余报表
	public ViewSurplusOrderService getViewSurplusOrderServiceImpl(){
		return (ViewSurplusOrderService)this.getBean("viewSurplusOrderServiceImpl");
	}
	
	//test
	public MonthMarkeViewService getMonthMarkeViewServiceImpl(){
		return (MonthMarkeViewService)this.getBean("monthMarkeViewServiceImpl");
	}	
}
